package impl;

import dao.BaoDao;
import dao.UserDaoImpl;
import pojo.AirQualityIndex;
import service.BaoDaoservice;

import java.util.List;

public class BaoDaoserviceImpl implements BaoDaoservice {
    private BaoDao baosDao;
    public BaoDaoserviceImpl(){
        baosDao= new UserDaoImpl();
    }
    @Override
    public List<AirQualityIndex> select(int districtId) {
        return baosDao.select(districtId);
    }

    @Override
    public boolean add(AirQualityIndex aq) {
        return baosDao.add(aq);
    }

    @Override
    public List<AirQualityIndex> selecByName(String name) {
        return baosDao.selecByName(name);
    }


    public List<AirQualityIndex> selecById(int id) {
        return baosDao.selecById(id);
    }

    @Override
    public int update(AirQualityIndex aq) {
        return baosDao.update(aq);
    }

    @Override
    public boolean del(int districtId) {
        return baosDao.del(districtId);
    }

    @Override
    public List<AirQualityIndex> selectAll() {
        return baosDao.selectAll();
    }
}
